{extend name="index/admin-index" /}
{block name="main"}


  <!-- content start -->
  <div class="admin-content">
    <div class="admin-content-body">
      <div class="am-cf am-padding am-padding-bottom-0">
        <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">板块信息</strong> / <small>Plate information</small></div>
      </div>

      <hr/>

      <div class="am-g">
        <div class="am-u-sm-12 am-u-md-4 am-u-md-push-8">
          <div class="am-panel am-panel-default">
            <div class="am-panel-bd">
              <div class="am-g">
                <div class="am-u-md-4">
                  <img class="am-img-circle am-img-thumbnail" src="/uploads/{$list.icon}" alt=""/>
                </div>
                <div class="am-u-md-8">
                  
                  <form  action="{:url('Category/editimg',['sid'=>$list.id])}" class="am-form" class="am-form"  enctype="multipart/form-data" method="post">
                    <div class="am-form-group">
                      <input type="file" id="user-pic" name="icon">
                      <p class="am-form-help">请选择要上传的板块头像...</p>
                      <input type="hidden" value="{$list.id}">
                      <button type="submit" id="submit" class="am-btn am-btn-primary am-btn-xs">保存</button>
                    </div>
                  </form>
                </div>
              </div>
            </div>
          </div>

         

        </div>

        <div class="am-u-sm-12 am-u-md-8 am-u-md-pull-4">
          <form  action="{:url('Category/editinfo',['sid'=>$list.id])}" class="am-form am-form-horizontal">
            <div class="am-form-group">
              <label for="user-name" class="am-u-sm-3 am-form-label">板块名</label>
              <div class="am-u-sm-9">
                <input type="text" id="user-name" name='name' value="{$list.name}">
                <small>输入新的板块名，让我记住你。</small>
              </div>
            </div>

           

            

           
            <div class="am-form-group">
              <label for="user-intro" class="am-u-sm-3 am-form-label">简介 / Intro</label>
              <div class="am-u-sm-9">
                <textarea class="" rows="5" name="profile" id="user-intro">{$list.profile}</textarea>
              
              </div>
            </div>

            <div class="am-form-group">
              <div class="am-u-sm-9 am-u-sm-push-3">
                <button type="submit" class="am-btn am-btn-primary">保存修改</button>
              </div>
            </div>
          </form>
        </div>
      </div>
    </div>

    <footer class="admin-content-footer">
      <hr>
      <p class="am-padding-left">© 2017 兄弟连s58二期项目</p>
    </footer>

    <<!-- script>
        $('#submit').click(function(){
          var info=$('#input input').serialize();
          // console.log(info);
          $.ajax({
            type:'post',
            url:'editimg',
            dataType: 'json',
            data:info, 
            success:function(data){
              console.log(data)
            }
          })
        })
    </script> -->
{/block}